package com.sky.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class PageQueryDTO {
    //页码
    @ApiModelProperty("分页页码")
    private int page;

    //每页显示记录数
    @ApiModelProperty("每页记录数")
    private int pageSize;

    public void check(){
        if (page <= 0){
            page = 1;
        }
        if (pageSize <= 0 || pageSize > 100){
            pageSize = 10;
        }
    }
}
